Conversation
sungwonnoh
commented
Oct 25, 2025
- 로그아웃 api연결
- 401 에러 인터셉트 분기처리
Summary of ChangesHello @sungwonnoh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자 인증 흐름의 안정성과 사용자 경험을 개선하기 위해 로그아웃 기능을 API와 연동하고, 401 인증 에러 처리 로직을 고도화합니다. 특히, 만료된 토큰을 자동으로 재발급하여 사용자 세션을 유지하고, 유효하지 않은 토큰에 대해서는 즉시 로그아웃 처리하여 보안을 강화하는 데 중점을 두었습니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| return res; | ||
| }, | ||
| async (error) => { | ||
| const originalRequest = error.config; |
There was a problem hiding this comment.
error.config 객체에 _retry 속성을 동적으로 추가하고 있습니다. 이는 타입스크립트의 정적 타입 검사를 우회하는 방식으로, 코드의 가독성과 안정성을 저해할 수 있습니다. AxiosRequestConfig를 확장하는 별도의 인터페이스를 선언하여 _retry 속성을 명시적으로 정의하는 것이 좋습니다.
import { AxiosRequestConfig } from "axios";
interface RetryableAxiosRequestConfig extends AxiosRequestConfig {
_retry?: boolean;
}
// ...
const originalRequest = error.config as RetryableAxiosRequestConfig;이렇게 하면 _retry 속성의 존재와 타입을 명확히 할 수 있어 실수를 방지하고 코드 이해도를 높일 수 있습니다.